/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部样式 */
header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

header h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* 任务列表样式 */
.task-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.task-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.task-card.completed {
    opacity: 0.7;
    background-color: #f9f9f9;
}

.task-card.completed .task-title {
    text-decoration: line-through;
}

.task-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.task-description {
    margin-bottom: 15px;
    color: #555;
}

.task-due-date {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}

.task-actions {
    display: flex;
    justify-content: space-between;
}

.btn-complete, .btn-edit, .btn-delete {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-complete {
    background-color: #2ecc71;
    color: white;
}

.btn-complete:hover {
    background-color: #27ae60;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
}

.btn-edit:hover {
    background-color: #d35400;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .task-list {
        grid-template-columns: 1fr;
    }
    
    body {
        padding: 10px;
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #777;
    grid-column: 1 / -1;
}

.empty-state h2 {
    margin-bottom: 10px;
}